package com.designpattern.firstchapter;

import com.designpattern.firstchapter.inter.FlyBehavior;
import com.designpattern.firstchapter.inter.QuackBehavior;

public abstract class Duck {
	
	QuackBehavior quackBehavior;
	FlyBehavior flyBehavior;
	
	public void performQuack() {
		quackBehavior.quack();
	}
	
	public void performFly() {
		flyBehavior.fly();
	}
	
	public void setFlyBehavior(FlyBehavior fb) {
		flyBehavior = fb;
		
	}
	
	public void setQuackBehavior(QuackBehavior qb) {
		
		quackBehavior = qb;
		
	}
	
	public abstract  void display();

}
